package com.xu.modules.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 个人用户
 * </p>
 *
 * @author xu
 * @since 2022-07-19
 */
@Getter
@Setter
@Builder
@TableName("personal_user")
public class PersonalUserEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;


    /**
     * 昵称
     */
    @TableField("nickname")
    private String nickname;

    /**
     * 用户状态 1-可用 2-禁用
     */
    @TableField("user_status")
    private Boolean userStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
